{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "f5f5eb88-43a2-45b2-95b4-e555f2b935d8",
   "metadata": {},
   "source": [
    "##  Pandas\n",
    "\n",
    "panel DAS -> DATA Analysis Software(system)\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "id": "caea14d0-a238-4114-b083-45f771470b71",
   "metadata": {},
   "outputs": [],
   "source": [
    "import os\n",
    "import numpy as np\n",
    "import pandas as pd\n",
    "import matplotlib.pyplot as plt\n",
    "%matplotlib inline"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "id": "98253587-6378-4a24-854b-775a1e41b666",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([ 60,  70,  65, 100, 230, 150, 100, 300, 250, 150])"
      ]
     },
     "execution_count": 14,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 时间4点，5点，... 22点\n",
    "times = np.array([6, 7, 8, 11, 12, 13, 18, 19, 20, 21])\n",
    "# 顾客人数\n",
    "customers = np.array([60, 70, 65, 100, 230, 150, 100, 300, 250, 150])\n",
    "customers"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "id": "141ef39e-2d95-4ce5-a2dd-ea94b1704238",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0     60\n",
       "1     70\n",
       "2     65\n",
       "3    100\n",
       "4    230\n",
       "5    150\n",
       "6    100\n",
       "7    300\n",
       "8    250\n",
       "9    150\n",
       "dtype: int64"
      ]
     },
     "execution_count": 18,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 时间4点，5点，... 22点\n",
    "times = pd.Series([6, 7, 8, 11, 12, 13, 18, 19, 20, 21])\n",
    "# 顾客人数\n",
    "customers = pd.Series([60, 70, 65, 100, 230, 150, 100, 300, 250, 150])\n",
    "customers"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "id": "e93aa48e-adbc-4ba5-a37e-98ab4030899b",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[<matplotlib.lines.Line2D at 0x1ae9740ee70>]"
      ]
     },
     "execution_count": 20,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAigAAAGdCAYAAAA44ojeAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjguNCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8fJSN1AAAACXBIWXMAAA9hAAAPYQGoP6dpAABVbUlEQVR4nO3deXyU9bn//9c9k2SyD2RPIECAALIjroiGTZBWrcUWq61La3u0Lj244nJ6Du1pQWlFW/mp1eNxrdVvW1F7XFEggriwyiJL2ANkEghhsq9z//6YzCTBsASS3LO8n4/HPCAzdybXiJNcuT6f6/oYpmmaiIiIiAQQm9UBiIiIiBxLCYqIiIgEHCUoIiIiEnCUoIiIiEjAUYIiIiIiAUcJioiIiAQcJSgiIiIScJSgiIiISMCJsDqA0+HxeDh48CAJCQkYhmF1OCIiInIKTNOkoqKCrKwsbLYT10iCMkE5ePAg2dnZVochIiIip6GwsJDevXuf8JqgTFASEhIA7wtMTEy0OBoRERE5FeXl5WRnZ/t/jp9IUCYovmWdxMREJSgiIiJB5lS2Z2iTrIiIiAQcJSgiIiIScJSgiIiISMBRgiIiIiIBRwmKiIiIBBwlKCIiIhJwlKCIiIhIwFGCIiIiIgFHCYqIiIgEnA4lKE8//TQjR470T3C98MILef/99/2Pm6bJnDlzyMrKIiYmhgkTJrB58+Y2z1FXV8edd95JSkoKcXFxXHnllezfv79zXo2IiEhXOLAWXrzc+6d0iw4lKL179+aRRx5h9erVrF69mkmTJvG9733Pn4TMnz+fBQsWsHDhQlatWkVGRgaXXnopFRUV/ueYNWsWixYt4vXXX2fFihVUVlZy+eWX09TU1LmvTEREpLN8/TrsWQ4b3rA6krBhmKZpnskTJCUl8Yc//IGf/exnZGVlMWvWLGbPng14qyXp6ek8+uij3HLLLbjdbl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WuoREREJPhUVFTidzhNe0+kJyr333ssVV1xBnz59KCkp4Xe/+x3l5eXceOONGIbBrFmzmDt3Lrm5ueTm5jJ37lxiY2O57rrrTvlrZGVlUVhYSEJCwgmXhk5HeXk52dnZFBYWkpiY2KnPHYj0ekObXm9oC7fXC+H3mkPt9ZqmSUVFBVlZWSe9ttMTlP3793Pttddy+PBhUlNTueCCC/jiiy/o27cvAPfffz81NTXcdtttlJWVcf755/PRRx+RkJBwyl/DZrPRu3fvzg69jcTExJD4n+FU6fWGNr3e0BZurxfC7zWH0us9WeXEp9MTlNdff/2EjxuGwZw5c5gzZ05nf2kREREJETqLR0RERAKOEpRjOBwO/uu//qtN11Ao0+sNbXq9oS3cXi+E32sOt9fbmmGeSq+PiIiISDdSBUVEREQCjhIUERERCThKUERERCTgKEERERGRgKMEpdmBAwf4yU9+QnJyMrGxsYwePZo1a9ZYHVaXaWxs5D/+4z/IyckhJiaG/v3789vf/haPx2N1aJ3i008/5YorriArKwvDMHjrrbfaPG6aJnPmzCErK4uYmBgmTJjA5s2brQm2E5zo9TY0NDB79mxGjBhBXFwcWVlZ3HDDDRw8eNC6gM/Qyf59W7vlllswDIMnnnii2+LrbKfyerds2cKVV16J0+kkISGBCy64gH379nV/sJ3gZK+3srKSO+64g969exMTE8NZZ53F008/bU2wnWDevHmce+65JCQkkJaWxlVXXcW2bdvaXBNq37NOhRIUoKysjIsuuojIyEjef/99vvnmGx577DF69OhhdWhd5tFHH+WZZ55h4cKFbNmyhfnz5/OHP/yBJ5980urQOkVVVRWjRo1i4cKF7T4+f/58FixYwMKFC1m1ahUZGRlceuml/nOegs2JXm91dTVr167l17/+NWvXruXNN99k+/btXHnllRZE2jlO9u/r89Zbb/Hll1+e0ljtQHay17tz507Gjx/PkCFDWLZsGV9//TW//vWviY6O7uZIO8fJXu9dd93FBx98wKuvvsqWLVu46667uPPOO3n77be7OdLOkZ+fz+23384XX3zB4sWLaWxsZOrUqVRVVfmvCbXvWafEFHP27Nnm+PHjrQ6jW333u981f/azn7W5b8aMGeZPfvITiyLqOoC5aNEi/8cej8fMyMgwH3nkEf99tbW1ptPpNJ955hkLIuxcx77e9nz11VcmYO7du7d7gupCx3u9+/fvN3v16mVu2rTJ7Nu3r/n44493e2xdob3Xe80114Tke9c023+9w4YNM3/729+2ue/ss882/+M//qMbI+s6JSUlJmDm5+ebphn637OORxUU4J133uGcc87hhz/8IWlpaYwZM4bnnnvO6rC61Pjx4/nkk0/Yvn07AF9//TUrVqzgO9/5jsWRdb3du3fjcrmYOnWq/z6Hw0FeXh4rV660MLLu43a7MQwjZKuEHo+H66+/nvvuu49hw4ZZHU6X8ng8vPvuuwwaNIhp06aRlpbG+eeff8Jlr2A3fvx43nnnHQ4cOIBpmixdupTt27czbdo0q0PrFG63G4CkpCQgfL9nKUEBdu3axdNPP01ubi4ffvght956K7/61a94+eWXrQ6ty8yePZtrr72WIUOGEBkZyZgxY5g1axbXXnut1aF1OZfLBUB6enqb+9PT0/2PhbLa2loeeOABrrvuupA5fOxYjz76KBEREfzqV7+yOpQuV1JSQmVlJY888giXXXYZH330Ed///veZMWMG+fn5VofXJf785z8zdOhQevfuTVRUFJdddhlPPfUU48ePtzq0M2aaJnfffTfjx49n+PDhQPh+z+r0wwKDkcfj4ZxzzmHu3LkAjBkzhs2bN/P0009zww03WBxd13jjjTd49dVXee211xg2bBjr169n1qxZZGVlceONN1odXrcwDKPNx6Zpfuu+UNPQ0MCPfvQjPB4PTz31lNXhdIk1a9bwpz/9ibVr14b8vyfg39j+ve99j7vuuguA0aNHs3LlSp555hny8vKsDK9L/PnPf+aLL77gnXfeoW/fvnz66afcdtttZGZmMmXKFKvDOyN33HEHGzZsYMWKFd96LNy+Z6mCAmRmZjJ06NA295111llBuwP+VNx333088MAD/OhHP2LEiBFcf/313HXXXcybN8/q0LpcRkYGwLd+8ygpKfnWbyihpKGhgZkzZ7J7924WL14cstWT5cuXU1JSQp8+fYiIiCAiIoK9e/dyzz330K9fP6vD63QpKSlERESEzfewmpoaHnroIRYsWMAVV1zByJEjueOOO7jmmmv44x//aHV4Z+TOO+/knXfeYenSpfTu3dt/f7h+z1KCAlx00UXfaunavn07ffv2tSiirlddXY3N1vaf3263h0yb8Ynk5OSQkZHB4sWL/ffV19eTn5/PuHHjLIys6/iSk4KCAj7++GOSk5OtDqnLXH/99WzYsIH169f7b1lZWdx33318+OGHVofX6aKiojj33HPD5ntYQ0MDDQ0NIfX9yzRN7rjjDt58802WLFlCTk5Om8fD8XsWaIkH8LasjRs3jrlz5zJz5ky++uornn32WZ599lmrQ+syV1xxBb///e/p06cPw4YNY926dSxYsICf/exnVofWKSorK9mxY4f/4927d7N+/XqSkpLo06cPs2bNYu7cueTm5pKbm8vcuXOJjY3luuuuszDq03ei15uVlcUPfvAD1q5dy//93//R1NTk/00sKSmJqKgoq8I+bSf79z02AYuMjCQjI4PBgwd3d6id4mSv97777uOaa67hkksuYeLEiXzwwQf861//YtmyZdYFfQZO9nrz8vK47777iImJoW/fvuTn5/Pyyy+zYMECC6M+fbfffjuvvfYab7/9NgkJCf73p9PpJCYmBsMwQu571imxtIcogPzrX/8yhw8fbjocDnPIkCHms88+a3VIXaq8vNz893//d7NPnz5mdHS02b9/f/Phhx826+rqrA6tUyxdutQEvnW78cYbTdP0tu3913/9l5mRkWE6HA7zkksuMTdu3Ght0GfgRK939+7d7T4GmEuXLrU69NNysn/fYwV7m/GpvN7nn3/eHDhwoBkdHW2OGjXKfOutt6wL+Ayd7PUWFRWZN910k5mVlWVGR0ebgwcPNh977DHT4/FYG/hpOt7784UXXvBfE2rfs06FYZqm2aUZkIiIiEgHaQ+KiIiIBBwlKCIiIhJwlKCIiIhIwFGCIiIiIgFHCYqIiIgEHCUoIiIiEnCUoIiIiEjAUYIiIiIiAUcJioiIiAQcJSgiIiIScJSgiIiISMBRgiIiIiIB5/8HTO2aTEDyRyAAAAAASUVORK5CYII=",
      "text/plain": [
       "<Figure size 640x480 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.plot(times,customers)\n",
    "plt.plot(times,customers,'*')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "id": "f8bc6ca9-dddb-44ea-bad5-7609fcb139b6",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "RangeIndex(start=0, stop=10, step=1)"
      ]
     },
     "execution_count": 22,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "customers.values\n",
    "customers.index\n",
    "#pd.Series()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 108,
   "id": "bd8fff46-21f3-4335-9393-4f8d71cd50c3",
   "metadata": {},
   "outputs": [],
   "source": [
    "times = [6, 7, 8, 11, 12, 13, 18, 19, 20, 21]\n",
    "customers = pd.Series([60, 70, 65, 100, 230, 150, 100, 300, 250, 150],\n",
    "                      index=[6, 7, 8, 11, 12, 13, 18, 19, 20, 21])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 83,
   "id": "f93ab84c-eb83-43d2-ad6a-06aa45c38ea9",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "6      60\n",
       "7      70\n",
       "8      65\n",
       "11    100\n",
       "12    230\n",
       "13    150\n",
       "18    100\n",
       "19    300\n",
       "20    250\n",
       "21    150\n",
       "dtype: int64"
      ]
     },
     "execution_count": 83,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    " customers"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 110,
   "id": "1870f784-fcc5-4e50-be67-fbead0cf689a",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "230"
      ]
     },
     "execution_count": 110,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "customers[12]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 128,
   "id": "d1d515bf-67c4-4b3d-8c2b-8177a4bad06d",
   "metadata": {},
   "outputs": [],
   "source": [
    "times = ['6h', '7h', '8h', '11h', '12h', '13h', '18h', '19h', '20h','21h']\n",
    "customers = pd.Series([60, 70, 65, 100, 230, 150, 100, 300, 250, 150],\n",
    "                      index=times)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "id": "ec5ae95d-92ed-4fe4-a169-4e1df4601696",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0     60\n",
       "1     70\n",
       "2     65\n",
       "3    100\n",
       "4    230\n",
       "5    150\n",
       "6    100\n",
       "7    300\n",
       "8    250\n",
       "9    150\n",
       "dtype: int64"
      ]
     },
     "execution_count": 24,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "customers"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 95,
   "id": "0e19f50b-3948-4fb3-b88f-47ba59656473",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "100"
      ]
     },
     "execution_count": 95,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "np.int64(100)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 33,
   "id": "e1c4d21c-0924-449f-a592-69098275853c",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "70"
      ]
     },
     "execution_count": 33,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "customers.iloc[1]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 154,
   "id": "fa66d261-44fe-44dc-93ea-4ff8ecbad1fe",
   "metadata": {},
   "outputs": [],
   "source": [
    "# 时段4点，5点，... 22点\n",
    "times = np.array([6, 7, 8, 11, 12, 13, 18, 19, 20, 21])\n",
    "# 顾客人数\n",
    "customers = np.array([60, 70, 65, 100, 230, 150, 100, 300, 250, 150])\n",
    "# 平均消费\n",
    "costs = np.array([6, 7, 8, 24, 23, 26, 45, 55, 45, 40])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 158,
   "id": "ecb158ef-f635-47cd-81f0-cdad20e891b3",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>customers</th>\n",
       "      <th>costs</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>60</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>70</td>\n",
       "      <td>7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>65</td>\n",
       "      <td>8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>100</td>\n",
       "      <td>24</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>230</td>\n",
       "      <td>23</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13</th>\n",
       "      <td>150</td>\n",
       "      <td>26</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18</th>\n",
       "      <td>100</td>\n",
       "      <td>45</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19</th>\n",
       "      <td>300</td>\n",
       "      <td>55</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20</th>\n",
       "      <td>250</td>\n",
       "      <td>45</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>21</th>\n",
       "      <td>150</td>\n",
       "      <td>40</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "    customers  costs\n",
       "6          60      6\n",
       "7          70      7\n",
       "8          65      8\n",
       "11        100     24\n",
       "12        230     23\n",
       "13        150     26\n",
       "18        100     45\n",
       "19        300     55\n",
       "20        250     45\n",
       "21        150     40"
      ]
     },
     "execution_count": 158,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data = {'customers': customers, 'costs': costs}\n",
    "df = pd.DataFrame(data, index=times)\n",
    "df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 162,
   "id": "3bfbe720-78b0-44ae-91ea-c7a3c72076f9",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "23"
      ]
     },
     "execution_count": 162,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df['costs'][12]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "57543644-5cb2-4b9e-8ba3-cdc7d15eb5ff",
   "metadata": {},
   "outputs": [],
   "source": [
    "训练；\n",
    "\n",
    "生成40个同学的语文成绩，满分150，平均80分，方差20分，用随机数生成40个分数，要求为整数：\n",
    "数学： 60+-30\n",
    "英语： 70+-20\n",
    "物理： 80+-10\n",
    "numpy.random.normal\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 223,
   "id": "8a9e60d0-8256-4afa-bf4a-97aa531bd467",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[88. 82. 84. 90. 88. 76. 84. 79. 80. 82. 81. 87. 83. 81. 82. 81. 87. 79.\n",
      " 81. 76. 69. 83. 84. 77. 90. 73. 80. 79. 87. 87. 81. 82. 76. 71. 78. 81.\n",
      " 86. 85. 78. 79.]\n"
     ]
    }
   ],
   "source": [
    "import numpy as np\n",
    "\n",
    "# 设置随机种子以确保结果的可重复性\n",
    "np.random.seed(0)\n",
    "\n",
    "# 生成40个平均为80，方差为20的随机数\n",
    "scores = np.random.normal(loc=80, scale=np.sqrt(20), size=40)\n",
    "\n",
    "# 四舍五入到最近的整数\n",
    "scores_rounded = np.round(scores)\n",
    "\n",
    "# 确保分数在0到150之间\n",
    "scores_clipped = np.clip(scores_rounded, 0, 150)\n",
    "\n",
    "# 打印结果\n",
    "print(scores_clipped)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 192,
   "id": "2cc9b4ee-8ebc-4d2c-bc1c-bf9ced689fe4",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([ 65,  63,  85,  62,  56,  73,  76, 125,  65,  98,  94,  56,  95,\n",
       "        56,  26,  92,  44,  89,  66, 113, 101,  70,  66,  55,  71,  74,\n",
       "        72,  83,  91,  86,  64,  51, 107,  66,  66,  69,  43,  70,  70,\n",
       "        92])"
      ]
     },
     "execution_count": 192,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "scores = np.random.normal(80, 20, 40).astype(np.int32)\n",
    "#scores_rounded = np.round(scores)\n",
    "\n",
    "scores"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 43,
   "id": "25d5ec53-f206-4cd5-b156-7d816c6f4b15",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Chinese</th>\n",
       "      <th>Math</th>\n",
       "      <th>English</th>\n",
       "      <th>Physics</th>\n",
       "      <th>Total</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>32219100001</th>\n",
       "      <td>115</td>\n",
       "      <td>28</td>\n",
       "      <td>46</td>\n",
       "      <td>83</td>\n",
       "      <td>272</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100002</th>\n",
       "      <td>88</td>\n",
       "      <td>17</td>\n",
       "      <td>88</td>\n",
       "      <td>69</td>\n",
       "      <td>262</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100003</th>\n",
       "      <td>99</td>\n",
       "      <td>8</td>\n",
       "      <td>79</td>\n",
       "      <td>82</td>\n",
       "      <td>268</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100004</th>\n",
       "      <td>124</td>\n",
       "      <td>118</td>\n",
       "      <td>39</td>\n",
       "      <td>93</td>\n",
       "      <td>374</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100005</th>\n",
       "      <td>117</td>\n",
       "      <td>44</td>\n",
       "      <td>99</td>\n",
       "      <td>73</td>\n",
       "      <td>333</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100006</th>\n",
       "      <td>60</td>\n",
       "      <td>46</td>\n",
       "      <td>107</td>\n",
       "      <td>78</td>\n",
       "      <td>291</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100007</th>\n",
       "      <td>99</td>\n",
       "      <td>22</td>\n",
       "      <td>93</td>\n",
       "      <td>75</td>\n",
       "      <td>289</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100008</th>\n",
       "      <td>76</td>\n",
       "      <td>83</td>\n",
       "      <td>66</td>\n",
       "      <td>98</td>\n",
       "      <td>323</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100009</th>\n",
       "      <td>77</td>\n",
       "      <td>11</td>\n",
       "      <td>48</td>\n",
       "      <td>86</td>\n",
       "      <td>222</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100010</th>\n",
       "      <td>88</td>\n",
       "      <td>53</td>\n",
       "      <td>91</td>\n",
       "      <td>84</td>\n",
       "      <td>316</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100011</th>\n",
       "      <td>82</td>\n",
       "      <td>33</td>\n",
       "      <td>61</td>\n",
       "      <td>72</td>\n",
       "      <td>248</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100012</th>\n",
       "      <td>109</td>\n",
       "      <td>71</td>\n",
       "      <td>94</td>\n",
       "      <td>85</td>\n",
       "      <td>359</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100013</th>\n",
       "      <td>95</td>\n",
       "      <td>44</td>\n",
       "      <td>74</td>\n",
       "      <td>73</td>\n",
       "      <td>286</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100014</th>\n",
       "      <td>82</td>\n",
       "      <td>24</td>\n",
       "      <td>89</td>\n",
       "      <td>80</td>\n",
       "      <td>275</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100015</th>\n",
       "      <td>88</td>\n",
       "      <td>59</td>\n",
       "      <td>77</td>\n",
       "      <td>73</td>\n",
       "      <td>297</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100016</th>\n",
       "      <td>86</td>\n",
       "      <td>72</td>\n",
       "      <td>84</td>\n",
       "      <td>86</td>\n",
       "      <td>328</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100017</th>\n",
       "      <td>109</td>\n",
       "      <td>61</td>\n",
       "      <td>70</td>\n",
       "      <td>85</td>\n",
       "      <td>325</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100018</th>\n",
       "      <td>75</td>\n",
       "      <td>69</td>\n",
       "      <td>105</td>\n",
       "      <td>77</td>\n",
       "      <td>326</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100019</th>\n",
       "      <td>86</td>\n",
       "      <td>40</td>\n",
       "      <td>72</td>\n",
       "      <td>83</td>\n",
       "      <td>281</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100020</th>\n",
       "      <td>62</td>\n",
       "      <td>49</td>\n",
       "      <td>78</td>\n",
       "      <td>69</td>\n",
       "      <td>258</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100021</th>\n",
       "      <td>28</td>\n",
       "      <td>39</td>\n",
       "      <td>107</td>\n",
       "      <td>65</td>\n",
       "      <td>239</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100022</th>\n",
       "      <td>93</td>\n",
       "      <td>49</td>\n",
       "      <td>43</td>\n",
       "      <td>84</td>\n",
       "      <td>269</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100023</th>\n",
       "      <td>97</td>\n",
       "      <td>35</td>\n",
       "      <td>44</td>\n",
       "      <td>81</td>\n",
       "      <td>257</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100024</th>\n",
       "      <td>65</td>\n",
       "      <td>8</td>\n",
       "      <td>89</td>\n",
       "      <td>86</td>\n",
       "      <td>248</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100025</th>\n",
       "      <td>125</td>\n",
       "      <td>65</td>\n",
       "      <td>46</td>\n",
       "      <td>103</td>\n",
       "      <td>339</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100026</th>\n",
       "      <td>50</td>\n",
       "      <td>47</td>\n",
       "      <td>108</td>\n",
       "      <td>89</td>\n",
       "      <td>294</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100027</th>\n",
       "      <td>80</td>\n",
       "      <td>11</td>\n",
       "      <td>61</td>\n",
       "      <td>70</td>\n",
       "      <td>222</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100028</th>\n",
       "      <td>76</td>\n",
       "      <td>73</td>\n",
       "      <td>55</td>\n",
       "      <td>91</td>\n",
       "      <td>295</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100029</th>\n",
       "      <td>110</td>\n",
       "      <td>32</td>\n",
       "      <td>108</td>\n",
       "      <td>66</td>\n",
       "      <td>316</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100030</th>\n",
       "      <td>109</td>\n",
       "      <td>61</td>\n",
       "      <td>99</td>\n",
       "      <td>75</td>\n",
       "      <td>344</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100031</th>\n",
       "      <td>83</td>\n",
       "      <td>81</td>\n",
       "      <td>107</td>\n",
       "      <td>79</td>\n",
       "      <td>350</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100032</th>\n",
       "      <td>87</td>\n",
       "      <td>63</td>\n",
       "      <td>88</td>\n",
       "      <td>97</td>\n",
       "      <td>335</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100033</th>\n",
       "      <td>62</td>\n",
       "      <td>94</td>\n",
       "      <td>52</td>\n",
       "      <td>72</td>\n",
       "      <td>280</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100034</th>\n",
       "      <td>40</td>\n",
       "      <td>22</td>\n",
       "      <td>108</td>\n",
       "      <td>71</td>\n",
       "      <td>241</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100035</th>\n",
       "      <td>73</td>\n",
       "      <td>72</td>\n",
       "      <td>64</td>\n",
       "      <td>79</td>\n",
       "      <td>288</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100036</th>\n",
       "      <td>83</td>\n",
       "      <td>39</td>\n",
       "      <td>86</td>\n",
       "      <td>73</td>\n",
       "      <td>281</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100037</th>\n",
       "      <td>104</td>\n",
       "      <td>33</td>\n",
       "      <td>88</td>\n",
       "      <td>91</td>\n",
       "      <td>316</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100038</th>\n",
       "      <td>104</td>\n",
       "      <td>42</td>\n",
       "      <td>66</td>\n",
       "      <td>69</td>\n",
       "      <td>281</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100039</th>\n",
       "      <td>72</td>\n",
       "      <td>50</td>\n",
       "      <td>82</td>\n",
       "      <td>68</td>\n",
       "      <td>272</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100040</th>\n",
       "      <td>73</td>\n",
       "      <td>61</td>\n",
       "      <td>88</td>\n",
       "      <td>75</td>\n",
       "      <td>297</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "             Chinese  Math  English  Physics  Total\n",
       "32219100001      115    28       46       83    272\n",
       "32219100002       88    17       88       69    262\n",
       "32219100003       99     8       79       82    268\n",
       "32219100004      124   118       39       93    374\n",
       "32219100005      117    44       99       73    333\n",
       "32219100006       60    46      107       78    291\n",
       "32219100007       99    22       93       75    289\n",
       "32219100008       76    83       66       98    323\n",
       "32219100009       77    11       48       86    222\n",
       "32219100010       88    53       91       84    316\n",
       "32219100011       82    33       61       72    248\n",
       "32219100012      109    71       94       85    359\n",
       "32219100013       95    44       74       73    286\n",
       "32219100014       82    24       89       80    275\n",
       "32219100015       88    59       77       73    297\n",
       "32219100016       86    72       84       86    328\n",
       "32219100017      109    61       70       85    325\n",
       "32219100018       75    69      105       77    326\n",
       "32219100019       86    40       72       83    281\n",
       "32219100020       62    49       78       69    258\n",
       "32219100021       28    39      107       65    239\n",
       "32219100022       93    49       43       84    269\n",
       "32219100023       97    35       44       81    257\n",
       "32219100024       65     8       89       86    248\n",
       "32219100025      125    65       46      103    339\n",
       "32219100026       50    47      108       89    294\n",
       "32219100027       80    11       61       70    222\n",
       "32219100028       76    73       55       91    295\n",
       "32219100029      110    32      108       66    316\n",
       "32219100030      109    61       99       75    344\n",
       "32219100031       83    81      107       79    350\n",
       "32219100032       87    63       88       97    335\n",
       "32219100033       62    94       52       72    280\n",
       "32219100034       40    22      108       71    241\n",
       "32219100035       73    72       64       79    288\n",
       "32219100036       83    39       86       73    281\n",
       "32219100037      104    33       88       91    316\n",
       "32219100038      104    42       66       69    281\n",
       "32219100039       72    50       82       68    272\n",
       "32219100040       73    61       88       75    297"
      ]
     },
     "execution_count": 43,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "\n",
    "np.random.seed(0)      #随机数种子\n",
    "studentid = np.arange(32219100001, 32219100041)\n",
    "times = np.arange(1,41)\n",
    "Chinese = np.random.normal(80, 20, 40).astype(np.int32)\n",
    "Math = np.random.normal(60, 30, 40).astype(np.int32)\n",
    "English= np.random.normal(70, 20, 40).astype(np.int32)\n",
    "Physics = np.random.normal(80, 10, 40).astype(np.int32)\n",
    "Total = Chinese + Math + English + Physics\n",
    "data = {'Chinese':Chinese,'Math': Math, 'English': English,'Physics':Physics,'Total':Total}\n",
    "df = pd.DataFrame(data,index = studentid)\n",
    "\n",
    "df\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 283,
   "id": "579e5c74-4374-4bca-8959-084a5a797f70",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Chinese</th>\n",
       "      <th>Math</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>32219100001</th>\n",
       "      <td>115</td>\n",
       "      <td>28</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100002</th>\n",
       "      <td>88</td>\n",
       "      <td>17</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100003</th>\n",
       "      <td>99</td>\n",
       "      <td>8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100004</th>\n",
       "      <td>124</td>\n",
       "      <td>118</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100005</th>\n",
       "      <td>117</td>\n",
       "      <td>44</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100006</th>\n",
       "      <td>60</td>\n",
       "      <td>46</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100007</th>\n",
       "      <td>99</td>\n",
       "      <td>22</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100008</th>\n",
       "      <td>76</td>\n",
       "      <td>83</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100009</th>\n",
       "      <td>77</td>\n",
       "      <td>11</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100010</th>\n",
       "      <td>88</td>\n",
       "      <td>53</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100011</th>\n",
       "      <td>82</td>\n",
       "      <td>33</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100012</th>\n",
       "      <td>109</td>\n",
       "      <td>71</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100013</th>\n",
       "      <td>95</td>\n",
       "      <td>44</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100014</th>\n",
       "      <td>82</td>\n",
       "      <td>24</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100015</th>\n",
       "      <td>88</td>\n",
       "      <td>59</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100016</th>\n",
       "      <td>86</td>\n",
       "      <td>72</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100017</th>\n",
       "      <td>109</td>\n",
       "      <td>61</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100018</th>\n",
       "      <td>75</td>\n",
       "      <td>69</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100019</th>\n",
       "      <td>86</td>\n",
       "      <td>40</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100020</th>\n",
       "      <td>62</td>\n",
       "      <td>49</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100021</th>\n",
       "      <td>28</td>\n",
       "      <td>39</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100022</th>\n",
       "      <td>93</td>\n",
       "      <td>49</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100023</th>\n",
       "      <td>97</td>\n",
       "      <td>35</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100024</th>\n",
       "      <td>65</td>\n",
       "      <td>8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100025</th>\n",
       "      <td>125</td>\n",
       "      <td>65</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100026</th>\n",
       "      <td>50</td>\n",
       "      <td>47</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100027</th>\n",
       "      <td>80</td>\n",
       "      <td>11</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100028</th>\n",
       "      <td>76</td>\n",
       "      <td>73</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100029</th>\n",
       "      <td>110</td>\n",
       "      <td>32</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100030</th>\n",
       "      <td>109</td>\n",
       "      <td>61</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100031</th>\n",
       "      <td>83</td>\n",
       "      <td>81</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100032</th>\n",
       "      <td>87</td>\n",
       "      <td>63</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100033</th>\n",
       "      <td>62</td>\n",
       "      <td>94</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100034</th>\n",
       "      <td>40</td>\n",
       "      <td>22</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100035</th>\n",
       "      <td>73</td>\n",
       "      <td>72</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100036</th>\n",
       "      <td>83</td>\n",
       "      <td>39</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100037</th>\n",
       "      <td>104</td>\n",
       "      <td>33</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100038</th>\n",
       "      <td>104</td>\n",
       "      <td>42</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100039</th>\n",
       "      <td>72</td>\n",
       "      <td>50</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100040</th>\n",
       "      <td>73</td>\n",
       "      <td>61</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "             Chinese  Math\n",
       "32219100001      115    28\n",
       "32219100002       88    17\n",
       "32219100003       99     8\n",
       "32219100004      124   118\n",
       "32219100005      117    44\n",
       "32219100006       60    46\n",
       "32219100007       99    22\n",
       "32219100008       76    83\n",
       "32219100009       77    11\n",
       "32219100010       88    53\n",
       "32219100011       82    33\n",
       "32219100012      109    71\n",
       "32219100013       95    44\n",
       "32219100014       82    24\n",
       "32219100015       88    59\n",
       "32219100016       86    72\n",
       "32219100017      109    61\n",
       "32219100018       75    69\n",
       "32219100019       86    40\n",
       "32219100020       62    49\n",
       "32219100021       28    39\n",
       "32219100022       93    49\n",
       "32219100023       97    35\n",
       "32219100024       65     8\n",
       "32219100025      125    65\n",
       "32219100026       50    47\n",
       "32219100027       80    11\n",
       "32219100028       76    73\n",
       "32219100029      110    32\n",
       "32219100030      109    61\n",
       "32219100031       83    81\n",
       "32219100032       87    63\n",
       "32219100033       62    94\n",
       "32219100034       40    22\n",
       "32219100035       73    72\n",
       "32219100036       83    39\n",
       "32219100037      104    33\n",
       "32219100038      104    42\n",
       "32219100039       72    50\n",
       "32219100040       73    61"
      ]
     },
     "execution_count": 283,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df[['Chinese','Math']]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 288,
   "id": "e41d4ce8-a74d-471d-90c7-7ee8ec40530e",
   "metadata": {},
   "outputs": [],
   "source": [
    "df.to_csv('score.csv')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 303,
   "id": "689beb52-6fc1-45d3-a2ae-0f70f3a2bd3f",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Chinese    28\n",
       "Math       39\n",
       "English    51\n",
       "Physics    65\n",
       "Name: 32219100021, dtype: int32"
      ]
     },
     "execution_count": 303,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    " df.loc[32219100021]\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 320,
   "id": "abd549de-dbc3-4985-a2a5-c3f6d3b2452c",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Chinese</th>\n",
       "      <th>Math</th>\n",
       "      <th>English</th>\n",
       "      <th>Physics</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>32219100004</th>\n",
       "      <td>124</td>\n",
       "      <td>118</td>\n",
       "      <td>50</td>\n",
       "      <td>93</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100033</th>\n",
       "      <td>62</td>\n",
       "      <td>94</td>\n",
       "      <td>31</td>\n",
       "      <td>72</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "             Chinese  Math  English  Physics\n",
       "32219100004      124   118       50       93\n",
       "32219100033       62    94       31       72"
      ]
     },
     "execution_count": 320,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df[df['Math']>= 90]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 338,
   "id": "9661ec67-993b-47b3-b65e-51c486a01d16",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Chinese</th>\n",
       "      <th>Math</th>\n",
       "      <th>English</th>\n",
       "      <th>Physics</th>\n",
       "      <th>Total</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>32219100008</th>\n",
       "      <td>76</td>\n",
       "      <td>83</td>\n",
       "      <td>68</td>\n",
       "      <td>98</td>\n",
       "      <td>323</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100016</th>\n",
       "      <td>86</td>\n",
       "      <td>72</td>\n",
       "      <td>78</td>\n",
       "      <td>86</td>\n",
       "      <td>328</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100017</th>\n",
       "      <td>109</td>\n",
       "      <td>61</td>\n",
       "      <td>68</td>\n",
       "      <td>85</td>\n",
       "      <td>325</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100025</th>\n",
       "      <td>125</td>\n",
       "      <td>65</td>\n",
       "      <td>61</td>\n",
       "      <td>103</td>\n",
       "      <td>339</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100028</th>\n",
       "      <td>76</td>\n",
       "      <td>73</td>\n",
       "      <td>91</td>\n",
       "      <td>91</td>\n",
       "      <td>295</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100030</th>\n",
       "      <td>109</td>\n",
       "      <td>61</td>\n",
       "      <td>77</td>\n",
       "      <td>75</td>\n",
       "      <td>344</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100035</th>\n",
       "      <td>73</td>\n",
       "      <td>72</td>\n",
       "      <td>74</td>\n",
       "      <td>79</td>\n",
       "      <td>288</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100040</th>\n",
       "      <td>73</td>\n",
       "      <td>61</td>\n",
       "      <td>77</td>\n",
       "      <td>75</td>\n",
       "      <td>297</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "             Chinese  Math  English  Physics  Total\n",
       "32219100008       76    83       68       98    323\n",
       "32219100016       86    72       78       86    328\n",
       "32219100017      109    61       68       85    325\n",
       "32219100025      125    65       61      103    339\n",
       "32219100028       76    73       91       91    295\n",
       "32219100030      109    61       77       75    344\n",
       "32219100035       73    72       74       79    288\n",
       "32219100040       73    61       77       75    297"
      ]
     },
     "execution_count": 338,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df[(df['Math']>= 60)&(df['Chinese']>= 60)&(df['English']>= 60)&(df['Physics']>= 60)]"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "3c974a9c-2776-440d-acbe-eaa74bbc1d90",
   "metadata": {},
   "source": [
    "## 作业：\n",
    "    在当前数据的基础上，请进一步完成：\n",
    "1. 计算每个学生的平均。\n",
    "2. 计算每门课的平均\n",
    "3. 按学生的总分排序，输出到CSV，文件名自定\n",
    "4. 请给出一个成绩分析报告：\n",
    "    班上每门课的及格率 ，统计各分数的人数（<60%, 60-80%, 80%以上）"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 126,
   "id": "f50da4c2-cca9-43a2-a82d-c8c77fea22cb",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Chinese    85.775\n",
      "Math       48.225\n",
      "English    78.725\n",
      "Physics    79.700\n",
      "dtype: float64\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Chinese</th>\n",
       "      <th>Math</th>\n",
       "      <th>English</th>\n",
       "      <th>Physics</th>\n",
       "      <th>Total</th>\n",
       "      <th>Average</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>32219100001</th>\n",
       "      <td>115</td>\n",
       "      <td>28</td>\n",
       "      <td>46</td>\n",
       "      <td>83</td>\n",
       "      <td>272</td>\n",
       "      <td>68.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100002</th>\n",
       "      <td>88</td>\n",
       "      <td>17</td>\n",
       "      <td>88</td>\n",
       "      <td>69</td>\n",
       "      <td>262</td>\n",
       "      <td>65.50</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100003</th>\n",
       "      <td>99</td>\n",
       "      <td>8</td>\n",
       "      <td>79</td>\n",
       "      <td>82</td>\n",
       "      <td>268</td>\n",
       "      <td>67.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100004</th>\n",
       "      <td>124</td>\n",
       "      <td>118</td>\n",
       "      <td>39</td>\n",
       "      <td>93</td>\n",
       "      <td>374</td>\n",
       "      <td>93.50</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100005</th>\n",
       "      <td>117</td>\n",
       "      <td>44</td>\n",
       "      <td>99</td>\n",
       "      <td>73</td>\n",
       "      <td>333</td>\n",
       "      <td>83.25</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100006</th>\n",
       "      <td>60</td>\n",
       "      <td>46</td>\n",
       "      <td>107</td>\n",
       "      <td>78</td>\n",
       "      <td>291</td>\n",
       "      <td>72.75</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100007</th>\n",
       "      <td>99</td>\n",
       "      <td>22</td>\n",
       "      <td>93</td>\n",
       "      <td>75</td>\n",
       "      <td>289</td>\n",
       "      <td>72.25</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100008</th>\n",
       "      <td>76</td>\n",
       "      <td>83</td>\n",
       "      <td>66</td>\n",
       "      <td>98</td>\n",
       "      <td>323</td>\n",
       "      <td>80.75</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100009</th>\n",
       "      <td>77</td>\n",
       "      <td>11</td>\n",
       "      <td>48</td>\n",
       "      <td>86</td>\n",
       "      <td>222</td>\n",
       "      <td>55.50</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100010</th>\n",
       "      <td>88</td>\n",
       "      <td>53</td>\n",
       "      <td>91</td>\n",
       "      <td>84</td>\n",
       "      <td>316</td>\n",
       "      <td>79.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100011</th>\n",
       "      <td>82</td>\n",
       "      <td>33</td>\n",
       "      <td>61</td>\n",
       "      <td>72</td>\n",
       "      <td>248</td>\n",
       "      <td>62.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100012</th>\n",
       "      <td>109</td>\n",
       "      <td>71</td>\n",
       "      <td>94</td>\n",
       "      <td>85</td>\n",
       "      <td>359</td>\n",
       "      <td>89.75</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100013</th>\n",
       "      <td>95</td>\n",
       "      <td>44</td>\n",
       "      <td>74</td>\n",
       "      <td>73</td>\n",
       "      <td>286</td>\n",
       "      <td>71.50</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100014</th>\n",
       "      <td>82</td>\n",
       "      <td>24</td>\n",
       "      <td>89</td>\n",
       "      <td>80</td>\n",
       "      <td>275</td>\n",
       "      <td>68.75</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100015</th>\n",
       "      <td>88</td>\n",
       "      <td>59</td>\n",
       "      <td>77</td>\n",
       "      <td>73</td>\n",
       "      <td>297</td>\n",
       "      <td>74.25</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100016</th>\n",
       "      <td>86</td>\n",
       "      <td>72</td>\n",
       "      <td>84</td>\n",
       "      <td>86</td>\n",
       "      <td>328</td>\n",
       "      <td>82.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100017</th>\n",
       "      <td>109</td>\n",
       "      <td>61</td>\n",
       "      <td>70</td>\n",
       "      <td>85</td>\n",
       "      <td>325</td>\n",
       "      <td>81.25</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100018</th>\n",
       "      <td>75</td>\n",
       "      <td>69</td>\n",
       "      <td>105</td>\n",
       "      <td>77</td>\n",
       "      <td>326</td>\n",
       "      <td>81.50</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100019</th>\n",
       "      <td>86</td>\n",
       "      <td>40</td>\n",
       "      <td>72</td>\n",
       "      <td>83</td>\n",
       "      <td>281</td>\n",
       "      <td>70.25</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100020</th>\n",
       "      <td>62</td>\n",
       "      <td>49</td>\n",
       "      <td>78</td>\n",
       "      <td>69</td>\n",
       "      <td>258</td>\n",
       "      <td>64.50</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100021</th>\n",
       "      <td>28</td>\n",
       "      <td>39</td>\n",
       "      <td>107</td>\n",
       "      <td>65</td>\n",
       "      <td>239</td>\n",
       "      <td>59.75</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100022</th>\n",
       "      <td>93</td>\n",
       "      <td>49</td>\n",
       "      <td>43</td>\n",
       "      <td>84</td>\n",
       "      <td>269</td>\n",
       "      <td>67.25</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100023</th>\n",
       "      <td>97</td>\n",
       "      <td>35</td>\n",
       "      <td>44</td>\n",
       "      <td>81</td>\n",
       "      <td>257</td>\n",
       "      <td>64.25</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100024</th>\n",
       "      <td>65</td>\n",
       "      <td>8</td>\n",
       "      <td>89</td>\n",
       "      <td>86</td>\n",
       "      <td>248</td>\n",
       "      <td>62.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100025</th>\n",
       "      <td>125</td>\n",
       "      <td>65</td>\n",
       "      <td>46</td>\n",
       "      <td>103</td>\n",
       "      <td>339</td>\n",
       "      <td>84.75</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100026</th>\n",
       "      <td>50</td>\n",
       "      <td>47</td>\n",
       "      <td>108</td>\n",
       "      <td>89</td>\n",
       "      <td>294</td>\n",
       "      <td>73.50</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100027</th>\n",
       "      <td>80</td>\n",
       "      <td>11</td>\n",
       "      <td>61</td>\n",
       "      <td>70</td>\n",
       "      <td>222</td>\n",
       "      <td>55.50</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100028</th>\n",
       "      <td>76</td>\n",
       "      <td>73</td>\n",
       "      <td>55</td>\n",
       "      <td>91</td>\n",
       "      <td>295</td>\n",
       "      <td>73.75</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100029</th>\n",
       "      <td>110</td>\n",
       "      <td>32</td>\n",
       "      <td>108</td>\n",
       "      <td>66</td>\n",
       "      <td>316</td>\n",
       "      <td>79.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100030</th>\n",
       "      <td>109</td>\n",
       "      <td>61</td>\n",
       "      <td>99</td>\n",
       "      <td>75</td>\n",
       "      <td>344</td>\n",
       "      <td>86.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100031</th>\n",
       "      <td>83</td>\n",
       "      <td>81</td>\n",
       "      <td>107</td>\n",
       "      <td>79</td>\n",
       "      <td>350</td>\n",
       "      <td>87.50</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100032</th>\n",
       "      <td>87</td>\n",
       "      <td>63</td>\n",
       "      <td>88</td>\n",
       "      <td>97</td>\n",
       "      <td>335</td>\n",
       "      <td>83.75</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100033</th>\n",
       "      <td>62</td>\n",
       "      <td>94</td>\n",
       "      <td>52</td>\n",
       "      <td>72</td>\n",
       "      <td>280</td>\n",
       "      <td>70.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100034</th>\n",
       "      <td>40</td>\n",
       "      <td>22</td>\n",
       "      <td>108</td>\n",
       "      <td>71</td>\n",
       "      <td>241</td>\n",
       "      <td>60.25</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100035</th>\n",
       "      <td>73</td>\n",
       "      <td>72</td>\n",
       "      <td>64</td>\n",
       "      <td>79</td>\n",
       "      <td>288</td>\n",
       "      <td>72.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100036</th>\n",
       "      <td>83</td>\n",
       "      <td>39</td>\n",
       "      <td>86</td>\n",
       "      <td>73</td>\n",
       "      <td>281</td>\n",
       "      <td>70.25</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100037</th>\n",
       "      <td>104</td>\n",
       "      <td>33</td>\n",
       "      <td>88</td>\n",
       "      <td>91</td>\n",
       "      <td>316</td>\n",
       "      <td>79.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100038</th>\n",
       "      <td>104</td>\n",
       "      <td>42</td>\n",
       "      <td>66</td>\n",
       "      <td>69</td>\n",
       "      <td>281</td>\n",
       "      <td>70.25</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100039</th>\n",
       "      <td>72</td>\n",
       "      <td>50</td>\n",
       "      <td>82</td>\n",
       "      <td>68</td>\n",
       "      <td>272</td>\n",
       "      <td>68.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100040</th>\n",
       "      <td>73</td>\n",
       "      <td>61</td>\n",
       "      <td>88</td>\n",
       "      <td>75</td>\n",
       "      <td>297</td>\n",
       "      <td>74.25</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "             Chinese  Math  English  Physics  Total  Average\n",
       "32219100001      115    28       46       83    272    68.00\n",
       "32219100002       88    17       88       69    262    65.50\n",
       "32219100003       99     8       79       82    268    67.00\n",
       "32219100004      124   118       39       93    374    93.50\n",
       "32219100005      117    44       99       73    333    83.25\n",
       "32219100006       60    46      107       78    291    72.75\n",
       "32219100007       99    22       93       75    289    72.25\n",
       "32219100008       76    83       66       98    323    80.75\n",
       "32219100009       77    11       48       86    222    55.50\n",
       "32219100010       88    53       91       84    316    79.00\n",
       "32219100011       82    33       61       72    248    62.00\n",
       "32219100012      109    71       94       85    359    89.75\n",
       "32219100013       95    44       74       73    286    71.50\n",
       "32219100014       82    24       89       80    275    68.75\n",
       "32219100015       88    59       77       73    297    74.25\n",
       "32219100016       86    72       84       86    328    82.00\n",
       "32219100017      109    61       70       85    325    81.25\n",
       "32219100018       75    69      105       77    326    81.50\n",
       "32219100019       86    40       72       83    281    70.25\n",
       "32219100020       62    49       78       69    258    64.50\n",
       "32219100021       28    39      107       65    239    59.75\n",
       "32219100022       93    49       43       84    269    67.25\n",
       "32219100023       97    35       44       81    257    64.25\n",
       "32219100024       65     8       89       86    248    62.00\n",
       "32219100025      125    65       46      103    339    84.75\n",
       "32219100026       50    47      108       89    294    73.50\n",
       "32219100027       80    11       61       70    222    55.50\n",
       "32219100028       76    73       55       91    295    73.75\n",
       "32219100029      110    32      108       66    316    79.00\n",
       "32219100030      109    61       99       75    344    86.00\n",
       "32219100031       83    81      107       79    350    87.50\n",
       "32219100032       87    63       88       97    335    83.75\n",
       "32219100033       62    94       52       72    280    70.00\n",
       "32219100034       40    22      108       71    241    60.25\n",
       "32219100035       73    72       64       79    288    72.00\n",
       "32219100036       83    39       86       73    281    70.25\n",
       "32219100037      104    33       88       91    316    79.00\n",
       "32219100038      104    42       66       69    281    70.25\n",
       "32219100039       72    50       82       68    272    68.00\n",
       "32219100040       73    61       88       75    297    74.25"
      ]
     },
     "execution_count": 126,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "np.random.seed(0)      #随机数种子\n",
    "studentid = np.arange(32219100001, 32219100041)\n",
    "times = np.arange(1,41)\n",
    "Chinese = np.random.normal(80, 20, 40).astype(np.int32)\n",
    "Math = np.random.normal(60, 30, 40).astype(np.int32)\n",
    "English= np.random.normal(70, 20, 40).astype(np.int32)\n",
    "Physics = np.random.normal(80, 10, 40).astype(np.int32)\n",
    "Total = Chinese + Math + English + Physics\n",
    "Average =  (Chinese + Math + English + Physics)/4\n",
    "data = {'Chinese':Chinese,'Math': Math, 'English': English,'Physics':Physics,'Total':Total,'Average':Average}\n",
    "df = pd.DataFrame(data,index = studentid)\n",
    "Average_scores = df[['Chinese', 'Math', 'English', 'Physics']].mean()    #每个学生的平均成绩\n",
    "print(Average_scores)\n",
    "\n",
    "df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 79,
   "id": "3b0eee7c-41f3-4750-9a3e-23d605ecc83d",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Chinese</th>\n",
       "      <th>Math</th>\n",
       "      <th>English</th>\n",
       "      <th>Physics</th>\n",
       "      <th>Total</th>\n",
       "      <th>Average</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>32219100004</th>\n",
       "      <td>124</td>\n",
       "      <td>118</td>\n",
       "      <td>39</td>\n",
       "      <td>93</td>\n",
       "      <td>374</td>\n",
       "      <td>93.50</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100012</th>\n",
       "      <td>109</td>\n",
       "      <td>71</td>\n",
       "      <td>94</td>\n",
       "      <td>85</td>\n",
       "      <td>359</td>\n",
       "      <td>89.75</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100031</th>\n",
       "      <td>83</td>\n",
       "      <td>81</td>\n",
       "      <td>107</td>\n",
       "      <td>79</td>\n",
       "      <td>350</td>\n",
       "      <td>87.50</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100030</th>\n",
       "      <td>109</td>\n",
       "      <td>61</td>\n",
       "      <td>99</td>\n",
       "      <td>75</td>\n",
       "      <td>344</td>\n",
       "      <td>86.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100025</th>\n",
       "      <td>125</td>\n",
       "      <td>65</td>\n",
       "      <td>46</td>\n",
       "      <td>103</td>\n",
       "      <td>339</td>\n",
       "      <td>84.75</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100032</th>\n",
       "      <td>87</td>\n",
       "      <td>63</td>\n",
       "      <td>88</td>\n",
       "      <td>97</td>\n",
       "      <td>335</td>\n",
       "      <td>83.75</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100005</th>\n",
       "      <td>117</td>\n",
       "      <td>44</td>\n",
       "      <td>99</td>\n",
       "      <td>73</td>\n",
       "      <td>333</td>\n",
       "      <td>83.25</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100016</th>\n",
       "      <td>86</td>\n",
       "      <td>72</td>\n",
       "      <td>84</td>\n",
       "      <td>86</td>\n",
       "      <td>328</td>\n",
       "      <td>82.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100018</th>\n",
       "      <td>75</td>\n",
       "      <td>69</td>\n",
       "      <td>105</td>\n",
       "      <td>77</td>\n",
       "      <td>326</td>\n",
       "      <td>81.50</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100017</th>\n",
       "      <td>109</td>\n",
       "      <td>61</td>\n",
       "      <td>70</td>\n",
       "      <td>85</td>\n",
       "      <td>325</td>\n",
       "      <td>81.25</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100008</th>\n",
       "      <td>76</td>\n",
       "      <td>83</td>\n",
       "      <td>66</td>\n",
       "      <td>98</td>\n",
       "      <td>323</td>\n",
       "      <td>80.75</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100010</th>\n",
       "      <td>88</td>\n",
       "      <td>53</td>\n",
       "      <td>91</td>\n",
       "      <td>84</td>\n",
       "      <td>316</td>\n",
       "      <td>79.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100037</th>\n",
       "      <td>104</td>\n",
       "      <td>33</td>\n",
       "      <td>88</td>\n",
       "      <td>91</td>\n",
       "      <td>316</td>\n",
       "      <td>79.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100029</th>\n",
       "      <td>110</td>\n",
       "      <td>32</td>\n",
       "      <td>108</td>\n",
       "      <td>66</td>\n",
       "      <td>316</td>\n",
       "      <td>79.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100040</th>\n",
       "      <td>73</td>\n",
       "      <td>61</td>\n",
       "      <td>88</td>\n",
       "      <td>75</td>\n",
       "      <td>297</td>\n",
       "      <td>74.25</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100015</th>\n",
       "      <td>88</td>\n",
       "      <td>59</td>\n",
       "      <td>77</td>\n",
       "      <td>73</td>\n",
       "      <td>297</td>\n",
       "      <td>74.25</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100028</th>\n",
       "      <td>76</td>\n",
       "      <td>73</td>\n",
       "      <td>55</td>\n",
       "      <td>91</td>\n",
       "      <td>295</td>\n",
       "      <td>73.75</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100026</th>\n",
       "      <td>50</td>\n",
       "      <td>47</td>\n",
       "      <td>108</td>\n",
       "      <td>89</td>\n",
       "      <td>294</td>\n",
       "      <td>73.50</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100006</th>\n",
       "      <td>60</td>\n",
       "      <td>46</td>\n",
       "      <td>107</td>\n",
       "      <td>78</td>\n",
       "      <td>291</td>\n",
       "      <td>72.75</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100007</th>\n",
       "      <td>99</td>\n",
       "      <td>22</td>\n",
       "      <td>93</td>\n",
       "      <td>75</td>\n",
       "      <td>289</td>\n",
       "      <td>72.25</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100035</th>\n",
       "      <td>73</td>\n",
       "      <td>72</td>\n",
       "      <td>64</td>\n",
       "      <td>79</td>\n",
       "      <td>288</td>\n",
       "      <td>72.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100013</th>\n",
       "      <td>95</td>\n",
       "      <td>44</td>\n",
       "      <td>74</td>\n",
       "      <td>73</td>\n",
       "      <td>286</td>\n",
       "      <td>71.50</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100019</th>\n",
       "      <td>86</td>\n",
       "      <td>40</td>\n",
       "      <td>72</td>\n",
       "      <td>83</td>\n",
       "      <td>281</td>\n",
       "      <td>70.25</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100036</th>\n",
       "      <td>83</td>\n",
       "      <td>39</td>\n",
       "      <td>86</td>\n",
       "      <td>73</td>\n",
       "      <td>281</td>\n",
       "      <td>70.25</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100038</th>\n",
       "      <td>104</td>\n",
       "      <td>42</td>\n",
       "      <td>66</td>\n",
       "      <td>69</td>\n",
       "      <td>281</td>\n",
       "      <td>70.25</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100033</th>\n",
       "      <td>62</td>\n",
       "      <td>94</td>\n",
       "      <td>52</td>\n",
       "      <td>72</td>\n",
       "      <td>280</td>\n",
       "      <td>70.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100014</th>\n",
       "      <td>82</td>\n",
       "      <td>24</td>\n",
       "      <td>89</td>\n",
       "      <td>80</td>\n",
       "      <td>275</td>\n",
       "      <td>68.75</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100039</th>\n",
       "      <td>72</td>\n",
       "      <td>50</td>\n",
       "      <td>82</td>\n",
       "      <td>68</td>\n",
       "      <td>272</td>\n",
       "      <td>68.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100001</th>\n",
       "      <td>115</td>\n",
       "      <td>28</td>\n",
       "      <td>46</td>\n",
       "      <td>83</td>\n",
       "      <td>272</td>\n",
       "      <td>68.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100022</th>\n",
       "      <td>93</td>\n",
       "      <td>49</td>\n",
       "      <td>43</td>\n",
       "      <td>84</td>\n",
       "      <td>269</td>\n",
       "      <td>67.25</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100003</th>\n",
       "      <td>99</td>\n",
       "      <td>8</td>\n",
       "      <td>79</td>\n",
       "      <td>82</td>\n",
       "      <td>268</td>\n",
       "      <td>67.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100002</th>\n",
       "      <td>88</td>\n",
       "      <td>17</td>\n",
       "      <td>88</td>\n",
       "      <td>69</td>\n",
       "      <td>262</td>\n",
       "      <td>65.50</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100020</th>\n",
       "      <td>62</td>\n",
       "      <td>49</td>\n",
       "      <td>78</td>\n",
       "      <td>69</td>\n",
       "      <td>258</td>\n",
       "      <td>64.50</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100023</th>\n",
       "      <td>97</td>\n",
       "      <td>35</td>\n",
       "      <td>44</td>\n",
       "      <td>81</td>\n",
       "      <td>257</td>\n",
       "      <td>64.25</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100024</th>\n",
       "      <td>65</td>\n",
       "      <td>8</td>\n",
       "      <td>89</td>\n",
       "      <td>86</td>\n",
       "      <td>248</td>\n",
       "      <td>62.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100011</th>\n",
       "      <td>82</td>\n",
       "      <td>33</td>\n",
       "      <td>61</td>\n",
       "      <td>72</td>\n",
       "      <td>248</td>\n",
       "      <td>62.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100034</th>\n",
       "      <td>40</td>\n",
       "      <td>22</td>\n",
       "      <td>108</td>\n",
       "      <td>71</td>\n",
       "      <td>241</td>\n",
       "      <td>60.25</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100021</th>\n",
       "      <td>28</td>\n",
       "      <td>39</td>\n",
       "      <td>107</td>\n",
       "      <td>65</td>\n",
       "      <td>239</td>\n",
       "      <td>59.75</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100027</th>\n",
       "      <td>80</td>\n",
       "      <td>11</td>\n",
       "      <td>61</td>\n",
       "      <td>70</td>\n",
       "      <td>222</td>\n",
       "      <td>55.50</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32219100009</th>\n",
       "      <td>77</td>\n",
       "      <td>11</td>\n",
       "      <td>48</td>\n",
       "      <td>86</td>\n",
       "      <td>222</td>\n",
       "      <td>55.50</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "             Chinese  Math  English  Physics  Total  Average\n",
       "32219100004      124   118       39       93    374    93.50\n",
       "32219100012      109    71       94       85    359    89.75\n",
       "32219100031       83    81      107       79    350    87.50\n",
       "32219100030      109    61       99       75    344    86.00\n",
       "32219100025      125    65       46      103    339    84.75\n",
       "32219100032       87    63       88       97    335    83.75\n",
       "32219100005      117    44       99       73    333    83.25\n",
       "32219100016       86    72       84       86    328    82.00\n",
       "32219100018       75    69      105       77    326    81.50\n",
       "32219100017      109    61       70       85    325    81.25\n",
       "32219100008       76    83       66       98    323    80.75\n",
       "32219100010       88    53       91       84    316    79.00\n",
       "32219100037      104    33       88       91    316    79.00\n",
       "32219100029      110    32      108       66    316    79.00\n",
       "32219100040       73    61       88       75    297    74.25\n",
       "32219100015       88    59       77       73    297    74.25\n",
       "32219100028       76    73       55       91    295    73.75\n",
       "32219100026       50    47      108       89    294    73.50\n",
       "32219100006       60    46      107       78    291    72.75\n",
       "32219100007       99    22       93       75    289    72.25\n",
       "32219100035       73    72       64       79    288    72.00\n",
       "32219100013       95    44       74       73    286    71.50\n",
       "32219100019       86    40       72       83    281    70.25\n",
       "32219100036       83    39       86       73    281    70.25\n",
       "32219100038      104    42       66       69    281    70.25\n",
       "32219100033       62    94       52       72    280    70.00\n",
       "32219100014       82    24       89       80    275    68.75\n",
       "32219100039       72    50       82       68    272    68.00\n",
       "32219100001      115    28       46       83    272    68.00\n",
       "32219100022       93    49       43       84    269    67.25\n",
       "32219100003       99     8       79       82    268    67.00\n",
       "32219100002       88    17       88       69    262    65.50\n",
       "32219100020       62    49       78       69    258    64.50\n",
       "32219100023       97    35       44       81    257    64.25\n",
       "32219100024       65     8       89       86    248    62.00\n",
       "32219100011       82    33       61       72    248    62.00\n",
       "32219100034       40    22      108       71    241    60.25\n",
       "32219100021       28    39      107       65    239    59.75\n",
       "32219100027       80    11       61       70    222    55.50\n",
       "32219100009       77    11       48       86    222    55.50"
      ]
     },
     "execution_count": 79,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.sort_values('Total', ascending=False)   #按学生总分排序，由高到低"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 83,
   "id": "288df853-73a1-4f1f-b5e2-2085d8408e2f",
   "metadata": {},
   "outputs": [],
   "source": [
    "df.to_csv('Grade Ranking.csv')     #成绩排名"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 87,
   "id": "3327c163-0af2-4dd9-8586-83059d4676ac",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Chinese     92.5\n",
      "Math        35.0\n",
      "English     80.0\n",
      "Physics    100.0\n",
      "dtype: float64\n"
     ]
    }
   ],
   "source": [
    "#及格率\n",
    "pass_rate = (df[['Chinese', 'Math', 'English', 'Physics']] >= 60).mean()*100\n",
    "print(pass_rate)\n",
    "\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 158,
   "id": "c4cc5b8b-5557-4271-ac92-e15141a9db4e",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "数学各分数段的人数: {'<60%': 26, '60-80%': 10, '80%以上': 4}\n",
      "语文各分数段的人数: {'80%以上': 25, '60-80%': 12, '<60%': 3}\n",
      "英语各分数段的人数: {'80%以上': 21, '60-80%': 11, '<60%': 8}\n",
      "物理各分数段的人数: {'60-80%': 22, '80%以上': 18}\n"
     ]
    }
   ],
   "source": [
    "#成绩报告\n",
    "def score_range(score):\n",
    "    if score < 60:\n",
    "        return '<60%'\n",
    "    elif 60 <= score <= 80:\n",
    "        return '60-80%'\n",
    "    elif score > 80:\n",
    "        return '80%以上'\n",
    "    \n",
    "Math_score_distribution = df['Math'].apply(score_range).value_counts().to_dict()\n",
    "Chinese_score_distribution = df['Chinese'].apply(score_range).value_counts().to_dict()\n",
    "English_score_distribution = df['English'].apply(score_range).value_counts().to_dict()\n",
    "Physics_score_distribution = df['Physics'].apply(score_range).value_counts().to_dict()\n",
    "print(f'数学各分数段的人数: {Math_score_distribution}')\n",
    "print(f'语文各分数段的人数: {Chinese_score_distribution}')\n",
    "print(f'英语各分数段的人数: {English_score_distribution}')\n",
    "print(f'物理各分数段的人数: {Physics_score_distribution}')\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "df69ec8c-e048-4032-8d51-ea325a12482f",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.12.4"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
